﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Capture
{
    public partial class setsize : Form
    {
        private int myX;
        private int myY;
        private Boolean clicked = false;

        public setsize()
        {
            InitializeComponent();
        }

        private void OKAY_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void setsize_Load(object sender, EventArgs e)
        {
            
        }

        private void click(object sender, MouseEventArgs e)
        {
            if (clicked == false)
            {
                myX = e.X;
                myY = e.Y;
                clicked = true;
                
            }

        }

        private void move(object sender, MouseEventArgs e)
        {
            if (clicked)
            {
                if (e.X > myX)
                {
                    this.Left += e.X - myX;
                }
                else
                {
                    this.Left -= myX - e.X;
                }

                if (e.Y > myY)
                {
                    this.Top += e.Y - myY;
                }
                else
                {
                    this.Top -= myY - e.Y;
                }
            }
        }

        private void disclick(object sender, MouseEventArgs e)
        {
            
            
            clicked = false;
        }
    }
}